﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jayden.Dll.CodeGen;

namespace CodeGenTest
{
	class Program
	{
		static void Main(string[] args)
		{
			CodeBuilder builder = new CodeBuilder();
			File file = new File("HelloWorld.cs");
			Namespace ns = new Namespace("Jayden.Dll.Generated");
			Entity c = new Entity("HelloWord");
			Member foo = new Member("Foo");
			Method sayHello = new Method("SayHello", "string", "protected");
			c.AddMember(foo);
			c.AddMethod(sayHello);
			ns.AddEntity(c);
			file.AddUsing("System");
			file.AddNamespace(ns);

			file.Generate(builder);

			Console.Write(builder.ToString());
			file.Save("");

			Console.Write("=== press any key to exit ===");
			Console.ReadKey(true);
		}
	}
}
